﻿using UnityEngine;
using System.Collections;

public class PathsManager : MonoBehaviour {
	public OnePath[] Paths{get{return m_paths;}}
	[SerializeField] OnePath[] m_paths;

	public static PathsManager _instance;
	void Awake(){
		PathsManager._instance = this;
		m_paths = GetComponentsInChildren<OnePath> ();
	}

	public OnePath GetPathOfName(string pathName){
		foreach (OnePath path in m_paths) {
			if (path.PathName == pathName) {
				return path;
			}
		}
		return null;
	}
}
